package day09_charset_io.com.itheima.d3_finally;

public class Test1 {
    public static void main(String[] args) {
        try {
            int c = 10 / 0;
            System.out.println("c = " + c);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            System.out.println("finally代码块");
        }
        System.out.println("add(10, 2) = " + add(10, 2));
    }
    private static int add(int a, int b){
        try {
            return a + b;
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            return 666;
        }
    }
}
